package com.jprocms.module.cms.controller.admin.guestbook.vo;

import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 留言板 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class GuestbookBaseVO {

    @Schema(description = "站点ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29114")
    private Long siteId;

    @Schema(description = "回复用户", example = "28062")
    @DiffLogField(name = "回复用户")
    private Long replyUserId;

    @Schema(description = "类型(数据字典cms_guestbook_type值)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "类型(数据字典cms_guestbook_type值)不能为空")
    @DiffLogField(name = "类型")
    private Integer guestbookType;

    @Schema(description = "留言标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "留言标题不能为空")
    @DiffLogField(name = "留言标题")
    private String title;

    @Schema(description = "留言内容")
    @DiffLogField(name = "留言内容")
    private String msgText;

    @Schema(description = "回复内容")
    @DiffLogField(name = "回复内容")
    private String replyText;

    @Schema(description = "回复日期")
    @DiffLogField(name = "回复日期")
    private Date replyDate;

    @Schema(description = "联系人")
    @DiffLogField(name = "联系人")
    private String contactUser;

    @Schema(description = "昵称", example = "jprocms")
    @DiffLogField(name = "昵称")
    private String nickname;

    @Schema(description = "手机号")
    @DiffLogField(name = "手机号")
    private String msgPhone;

    @Schema(description = "电子邮箱")
    @DiffLogField(name = "电子邮箱")
    private String msgEmail;

    @Schema(description = "联系地址")
    @DiffLogField(name = "联系地址")
    private String msgAddress;

    @Schema(description = "IP地址")
    private String msgIp;

    @Schema(description = "是否公开")
    @DiffLogField(name = "是否公开")
    private Integer isOpen;

    @Schema(description = "是否回复")
    @DiffLogField(name = "是否回复")
    private Integer isReplied;

    @Schema(description = "是否推荐")
    @DiffLogField(name = "是否推荐")
    private Integer recommended;

    @Schema(description = "状态(0:已审核,1:未审核,2:已屏蔽)用户传递无效，后台写死", example = "1")
    @DiffLogField(name = "状态")
    private Integer status;

    @Schema(description = "创建人ID", example = "23806")
    private Long userId;

    @Schema(description = "创建人用户名", example = "23806")
    private String username;

    @Schema(description = "回复人用户名", example = "23806")
    @DiffLogField(name = "回复人用户名")
    private String replyUserName;

}
